package cn.edu.scnu.springbootcinema.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.sql.Date;

@Data
@TableName("comments")
public class Comments implements Serializable {
    @Serial
    private static final long serialVersionUID = -3710185376322109571L;
    @TableId(value = "comment_id")
    private Integer id;
    private String content;
    @TableField("user_id")
    private Integer userId;
    private Integer movieId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("created_at")
    private Date createdDate;
}
